package com.turbo.cloud.ums.web.model.user;

import com.turbo.cloud.core.base.BaseModel;
import com.turbo.cloud.core.annotations.password.ValidPassword;
import com.turbo.cloud.core.validated.InsertValidated;
import com.turbo.cloud.core.validated.UpdateValidated;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhangluning
 */
@Data
@Accessors(chain = true)
@ToString(callSuper = true)
public class UmsUserQo extends BaseModel {

    /**
     * 主键
     */
    private String id;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String username;
    private String usernameByLike;

    /**
     * 姓名
     */
    private String realNameByLike;

    /**
     * 用户角色列表
     */
    @NotNull(message = "角色列表不能为空", groups = {InsertValidated.class})
    private List<String> roleIds;

    /**
     * 用户部门列表
     */
    @NotNull(message = "部门列表不能为空", groups = {InsertValidated.class})
    private List<String> deptIds;

    /**
     * 首页菜单Id
     */
    @NotBlank(message = "首页菜单不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String homeMenuId;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = {InsertValidated.class})
    @ValidPassword
    private String password;

    /**
     * 系统ID
     */
    private String systemId;

    /**
     * 验证码
     */
    private String verifyCode;

    /**
     * 头像
     */
    private String icon;

    /**
     * 手机号
     */
    private String mobileNo;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 姓名
     */
    private String realName;

    /**
     * 备注信息
     */
    private String note;
}
